package com.wondedDream.repository;

import com.wondedDream.model.MockExamQuestion;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface MockExamQuestionRepository extends JpaRepository<MockExamQuestion, Integer> {
    // 新增的自定义查询方法
    @Query("SELECT q FROM MockExamQuestion q WHERE q.mockExam.id = :mockExamId")
    List<MockExamQuestion> findByMockExamId(Integer mockExamId);
}